<template>
	<view style="padding: 30rpx;">
		<view class="mode">
			<u-form-item :border-bottom="false" label="修改需求" label-width="200" label-position="top" >
				<u-input placeholder="请输入备注" type="textarea" v-model="form.remark"></u-input>
			</u-form-item>
			<!-- <u-form-item :border-bottom="false" label="图片上传" label-width="200" label-position="top">
				<upload ref="image1" type="image" @uploaded="uploaded" :afterLoadUrl="form.image_url1"
					background="#FFE3DC" borderRadius="20" iconColor="#FF5D39" width="160" height="160"
					defaultLength="1"></upload>
			</u-form-item> -->
		</view>
		
		
		<!-- <view class="bg u-margin-bottom-20 u-flex u-margin-top-20" v-if="changeNum">
			
				<view>支付费用</view>
				<view style="font-size: 50rpx;">￥{{buyDesignReferFee}}</view>
			
		</view> -->
		
		
		<view class="bottomFix">
			<u-button shape="circle" @click="tijiao"  :custom-style="{background:'#FF5D39',color:'#fff',width:'500rpx'}">
				提交审核</u-button>
		</view>
		<u-toast ref="uToast" />
		
	</view>
</template>

<script>
	import upload from "@/components/upload_img.vue";

	export default{
		components: {
			upload
		},
		data(){
			return{
				id:'',
				buyDesignReferFee:'',
				form:{
					remark:""
				},
				changeNum:'',
				banShare:true
				
			}
		},
		onLoad(options) {
			if(options.id){
				this.id=options.id
			}
			if(options.changeNum){
				
				this.changeNum=Number(options.changeNum)
			}
			
			this.$u.api.Commission().then(res=>{
				this.buyDesignReferFee=Number(res.buyDesignReferFee).toFixed(2)
			})
		},
		methods:{
		   tijiao(){
			   if (!this.form.remark) {
			   	uni.$u.toast("请填写需求")
			   	return
			   }
		
			   
			   this.$u.post('/indent/designChange', {
					order_id:this.id,
					remark:this.form.remark
			   }).then(res => {
			   	  this.$refs.uToast.show({
			   	  	title: '修改成功',
			   	  	type: 'success',
			   	  	back:true
			   	  })
			   }).catch(err => {
			   
			   })
		   }
		}
	}
</script>

<style>
	.bg{
		background:#FF5D39;
		padding: 20rpx 40rpx;
		border-radius: 20rpx;
		color: #fff;
		display: flex;
		justify-content: space-between;
		align-items: center;
		
		
	}
</style>
